<template>
  <div class="callCustomerService">
    <el-tabs v-model="activeName">
      <el-tab-pane :label="one.name"
                   :name="one.value"
                   v-for="(one,index) in menu" :key="index">
      </el-tab-pane>
    </el-tabs>
    <keep-alive>
      <component :is="activeName"
                 :triggerClick="triggerClick"
      ></component>
    </keep-alive>
  </div>
</template>
<script>
  import blackRedList from './blackRedListLib/blackRedList.vue'
  import blackRedImport from './blackRedListLib/blackRedImport.vue'
  export default {
    data () {
      return {
        activeName: 'blackRedList',
        menu: [
          {name: '黑红名单详情', value: 'blackRedList'},
          {name: '黑红名单导入', value: 'blackRedImport'}
        ]
      }
    },
    props: {
      triggerClick: {type: Number, default: 0}
    },
    components: {
      blackRedList,
      blackRedImport
    },
    methods: {
      dealMenu () {
        this.activeName = this.menu[0].value
      }
    },
    beforeMount () {
      this.dealMenu()
    }
  }
</script>

<style lang="stylus" scoped>
  /*.callCustomerService*/
  /*.content*/
    /*height calc(100vh - 174px)*/
    /*overflow scroll*/
    /*overflow-x hidden*/
</style>
